* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h2 {
    color: #2d3748;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #667eea;
    margin: 0.5rem auto;
    border-radius: 2px;
}

#error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
}

#error-message::before {
    content: '!';
    background: #c53030;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

input::placeholder {
    color: #a0aec0;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        border-radius: 12px;
    }

    h2 {
        font-size: 1.5rem;
    }
}

#register-button {
    background: none;
    /* 去掉背景 */
    color: #2d3748;
    /* 设置文字颜色 */
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #667eea;
    /* 添加下划线 */
    border-radius: 0;
    /* 去掉圆角 */
    font-size: 0.9rem;
    /* 缩小文字 */
    font-weight: 400;
    /* 设置字体粗细 */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease;
    margin-top: 1.5rem;
    /* 添加顶部外边距以与登录表单分隔 */
    display: block;
    /* 使其成为块级元素，以便独占一行 */
    width: 100%;
    /* 使按钮宽度与容器一致 */
    text-align: center;
    /* 使按钮内的文本居中 */
    text-decoration: underline;
    /* 添加下划线 */
}

#register-button:hover {
    transform: translateY(-2px);
    box-shadow: none;
    /* 去掉阴影 */
    border-color: #764ba2;
    /* 改变下划线颜色 */
}

/* 注册弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    /* 减少内边距 */
    border-radius: 8px;
    width: 90%;
    max-width: 350px;
    /* 缩小弹窗宽度 */
    position: relative;
}

#register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* 减少表单项间距 */
}

/* 调整弹窗标题 */
.modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

.close {
    position: absolute;
    right: 0.8rem;
    top: 0.8rem;
    font-size: 1.3rem;
    cursor: pointer;
}

#register-error-message {
    color: #c53030;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    /* 缩小错误信息字体 */
    margin-top: 0.8rem;
}

#register-form input {
    padding: 0.6rem 1rem;
    /* 缩小输入框内边距 */
    font-size: 0.9rem;
    /* 缩小字体 */
    border: 1px solid #e2e8f0;
    /* 细化边框 */
}

#register-form button[type="submit"] {
    padding: 0.7rem;
    /* 缩小按钮尺寸 */
    font-size: 0.9rem;
    margin-top: 0.5rem;
    /* 减少顶部间距 */
}
